package com.ark.cloud.java.persistence.enums;

public enum SdkStructType {

    E_PlatState (1),
    E_SensorData (2),
    E_ScenarioState(3),
    E_ContactState (4),
    E_FireEvent (5),
    E_ExplodeEvent (6),
    E_DetectEvent  (7),
    E_BGCMD (8),
    E_SensorOnOffEvent (9),
    E_CommunicationEvent (10),
    E_DestoryEvent (11),
    E_JammerEvent (12),
    E_SimEngineState (13),
    E_AircraftStatus (14),
    E_ReplyCmd (15),
    E_AircraftLaunchCmd (16),
    E_SpeedCmd (17),
    E_WaypointCmd (18),
    E_JammerCmd  (19),
    E_GuideCmd (20),
    E_LuaCmd (21),
    E_LuaCmdReply (22),
    E_ReconnoiterCmd (23),
    E_ScenarioData (24),

    E_SatOrbit  (25),

    E_FireJGCmd  ( 28),
    E_FireDNCmd   (29),
    E_FireCKCmd  (30),
    E_SatelliteCmd  (31),

    E_FireJGEvent  ( 32),
    E_FireDNEvent  ( 33),
    E_FireCKEvent  (34),
    E_EndGameJGEvent  ( 35),
    E_EndGameDNEvent ( 36),
    E_EndGameCKEvent ( 37);


    private int mState = 0;

    SdkStructType(int value) {
        mState = value;
    }

    public int getState() {
        return mState;
    }

    /**
     * 提前判断，用于解决
     * Case中出现的Constant expression required
     * @param value
     * @return
     */
    public static SdkStructType getByValue(int value){
        for(SdkStructType x:values()){
            if(x.getState()==value){
                return x;
            }
        }
        return null;
    }



}
